package com.cweb.admin.model.bbs.bbs_category_info.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.cweb.framework.base.entity.BaseMybatisModel;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 论坛-分类信息
 * @author changfan
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class BbsCategoryInfo extends BaseMybatisModel {

    private static final long serialVersionUID=1L;

    /**
     * 物理id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 分类信息
     */
    @TableField(value = "`name`")
    private String name;

    /**
     * 上级
     */
    @TableField(value = "`parent`")
    private Long parent;

    /**
     * 状态（0：正常已发布）
     */
    @TableField(value = "`status`", select = false)
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "`create_time`", select = false)
    private Date createTime;

    /**
     * 备注
     */
    @TableField(value = "`remark`", select = false)
    private String remark;

    // 追加
    // 子对象
    @TableField(exist = false)
    private Object children;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
